package com.xxgc.ssm.po;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class GoodsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public GoodsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andGIdIsNull() {
            addCriterion("g_id is null");
            return (Criteria) this;
        }

        public Criteria andGIdIsNotNull() {
            addCriterion("g_id is not null");
            return (Criteria) this;
        }

        public Criteria andGIdEqualTo(Long value) {
            addCriterion("g_id =", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdNotEqualTo(Long value) {
            addCriterion("g_id <>", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdGreaterThan(Long value) {
            addCriterion("g_id >", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdGreaterThanOrEqualTo(Long value) {
            addCriterion("g_id >=", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdLessThan(Long value) {
            addCriterion("g_id <", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdLessThanOrEqualTo(Long value) {
            addCriterion("g_id <=", value, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdIn(List<Long> values) {
            addCriterion("g_id in", values, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdNotIn(List<Long> values) {
            addCriterion("g_id not in", values, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdBetween(Long value1, Long value2) {
            addCriterion("g_id between", value1, value2, "gId");
            return (Criteria) this;
        }

        public Criteria andGIdNotBetween(Long value1, Long value2) {
            addCriterion("g_id not between", value1, value2, "gId");
            return (Criteria) this;
        }

        public Criteria andGNameIsNull() {
            addCriterion("g_name is null");
            return (Criteria) this;
        }

        public Criteria andGNameIsNotNull() {
            addCriterion("g_name is not null");
            return (Criteria) this;
        }

        public Criteria andGNameEqualTo(String value) {
            addCriterion("g_name =", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameNotEqualTo(String value) {
            addCriterion("g_name <>", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameGreaterThan(String value) {
            addCriterion("g_name >", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameGreaterThanOrEqualTo(String value) {
            addCriterion("g_name >=", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameLessThan(String value) {
            addCriterion("g_name <", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameLessThanOrEqualTo(String value) {
            addCriterion("g_name <=", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameLike(String value) {
            addCriterion("g_name like", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameNotLike(String value) {
            addCriterion("g_name not like", value, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameIn(List<String> values) {
            addCriterion("g_name in", values, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameNotIn(List<String> values) {
            addCriterion("g_name not in", values, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameBetween(String value1, String value2) {
            addCriterion("g_name between", value1, value2, "gName");
            return (Criteria) this;
        }

        public Criteria andGNameNotBetween(String value1, String value2) {
            addCriterion("g_name not between", value1, value2, "gName");
            return (Criteria) this;
        }

        public Criteria andGImgIsNull() {
            addCriterion("g_img is null");
            return (Criteria) this;
        }

        public Criteria andGImgIsNotNull() {
            addCriterion("g_img is not null");
            return (Criteria) this;
        }

        public Criteria andGImgEqualTo(String value) {
            addCriterion("g_img =", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgNotEqualTo(String value) {
            addCriterion("g_img <>", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgGreaterThan(String value) {
            addCriterion("g_img >", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgGreaterThanOrEqualTo(String value) {
            addCriterion("g_img >=", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgLessThan(String value) {
            addCriterion("g_img <", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgLessThanOrEqualTo(String value) {
            addCriterion("g_img <=", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgLike(String value) {
            addCriterion("g_img like", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgNotLike(String value) {
            addCriterion("g_img not like", value, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgIn(List<String> values) {
            addCriterion("g_img in", values, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgNotIn(List<String> values) {
            addCriterion("g_img not in", values, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgBetween(String value1, String value2) {
            addCriterion("g_img between", value1, value2, "gImg");
            return (Criteria) this;
        }

        public Criteria andGImgNotBetween(String value1, String value2) {
            addCriterion("g_img not between", value1, value2, "gImg");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceIsNull() {
            addCriterion("g_original_price is null");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceIsNotNull() {
            addCriterion("g_original_price is not null");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceEqualTo(Double value) {
            addCriterion("g_original_price =", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceNotEqualTo(Double value) {
            addCriterion("g_original_price <>", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceGreaterThan(Double value) {
            addCriterion("g_original_price >", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("g_original_price >=", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceLessThan(Double value) {
            addCriterion("g_original_price <", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceLessThanOrEqualTo(Double value) {
            addCriterion("g_original_price <=", value, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceIn(List<Double> values) {
            addCriterion("g_original_price in", values, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceNotIn(List<Double> values) {
            addCriterion("g_original_price not in", values, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceBetween(Double value1, Double value2) {
            addCriterion("g_original_price between", value1, value2, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGOriginalPriceNotBetween(Double value1, Double value2) {
            addCriterion("g_original_price not between", value1, value2, "gOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceIsNull() {
            addCriterion("g_present_price is null");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceIsNotNull() {
            addCriterion("g_present_price is not null");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceEqualTo(Double value) {
            addCriterion("g_present_price =", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceNotEqualTo(Double value) {
            addCriterion("g_present_price <>", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceGreaterThan(Double value) {
            addCriterion("g_present_price >", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("g_present_price >=", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceLessThan(Double value) {
            addCriterion("g_present_price <", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceLessThanOrEqualTo(Double value) {
            addCriterion("g_present_price <=", value, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceIn(List<Double> values) {
            addCriterion("g_present_price in", values, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceNotIn(List<Double> values) {
            addCriterion("g_present_price not in", values, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceBetween(Double value1, Double value2) {
            addCriterion("g_present_price between", value1, value2, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGPresentPriceNotBetween(Double value1, Double value2) {
            addCriterion("g_present_price not between", value1, value2, "gPresentPrice");
            return (Criteria) this;
        }

        public Criteria andGDescribeIsNull() {
            addCriterion("g_describe is null");
            return (Criteria) this;
        }

        public Criteria andGDescribeIsNotNull() {
            addCriterion("g_describe is not null");
            return (Criteria) this;
        }

        public Criteria andGDescribeEqualTo(String value) {
            addCriterion("g_describe =", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeNotEqualTo(String value) {
            addCriterion("g_describe <>", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeGreaterThan(String value) {
            addCriterion("g_describe >", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeGreaterThanOrEqualTo(String value) {
            addCriterion("g_describe >=", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeLessThan(String value) {
            addCriterion("g_describe <", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeLessThanOrEqualTo(String value) {
            addCriterion("g_describe <=", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeLike(String value) {
            addCriterion("g_describe like", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeNotLike(String value) {
            addCriterion("g_describe not like", value, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeIn(List<String> values) {
            addCriterion("g_describe in", values, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeNotIn(List<String> values) {
            addCriterion("g_describe not in", values, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeBetween(String value1, String value2) {
            addCriterion("g_describe between", value1, value2, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGDescribeNotBetween(String value1, String value2) {
            addCriterion("g_describe not between", value1, value2, "gDescribe");
            return (Criteria) this;
        }

        public Criteria andGAndCcIsNull() {
            addCriterion("g_and_cc is null");
            return (Criteria) this;
        }

        public Criteria andGAndCcIsNotNull() {
            addCriterion("g_and_cc is not null");
            return (Criteria) this;
        }

        public Criteria andGAndCcEqualTo(Integer value) {
            addCriterion("g_and_cc =", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcNotEqualTo(Integer value) {
            addCriterion("g_and_cc <>", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcGreaterThan(Integer value) {
            addCriterion("g_and_cc >", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcGreaterThanOrEqualTo(Integer value) {
            addCriterion("g_and_cc >=", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcLessThan(Integer value) {
            addCriterion("g_and_cc <", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcLessThanOrEqualTo(Integer value) {
            addCriterion("g_and_cc <=", value, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcIn(List<Integer> values) {
            addCriterion("g_and_cc in", values, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcNotIn(List<Integer> values) {
            addCriterion("g_and_cc not in", values, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcBetween(Integer value1, Integer value2) {
            addCriterion("g_and_cc between", value1, value2, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGAndCcNotBetween(Integer value1, Integer value2) {
            addCriterion("g_and_cc not between", value1, value2, "gAndCc");
            return (Criteria) this;
        }

        public Criteria andGValidIsNull() {
            addCriterion("g_valid is null");
            return (Criteria) this;
        }

        public Criteria andGValidIsNotNull() {
            addCriterion("g_valid is not null");
            return (Criteria) this;
        }

        public Criteria andGValidEqualTo(String value) {
            addCriterion("g_valid =", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidNotEqualTo(String value) {
            addCriterion("g_valid <>", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidGreaterThan(String value) {
            addCriterion("g_valid >", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidGreaterThanOrEqualTo(String value) {
            addCriterion("g_valid >=", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidLessThan(String value) {
            addCriterion("g_valid <", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidLessThanOrEqualTo(String value) {
            addCriterion("g_valid <=", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidLike(String value) {
            addCriterion("g_valid like", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidNotLike(String value) {
            addCriterion("g_valid not like", value, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidIn(List<String> values) {
            addCriterion("g_valid in", values, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidNotIn(List<String> values) {
            addCriterion("g_valid not in", values, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidBetween(String value1, String value2) {
            addCriterion("g_valid between", value1, value2, "gValid");
            return (Criteria) this;
        }

        public Criteria andGValidNotBetween(String value1, String value2) {
            addCriterion("g_valid not between", value1, value2, "gValid");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeIsNull() {
            addCriterion("g_create_time is null");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeIsNotNull() {
            addCriterion("g_create_time is not null");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeEqualTo(Date value) {
            addCriterion("g_create_time =", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeNotEqualTo(Date value) {
            addCriterion("g_create_time <>", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeGreaterThan(Date value) {
            addCriterion("g_create_time >", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("g_create_time >=", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeLessThan(Date value) {
            addCriterion("g_create_time <", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("g_create_time <=", value, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeIn(List<Date> values) {
            addCriterion("g_create_time in", values, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeNotIn(List<Date> values) {
            addCriterion("g_create_time not in", values, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeBetween(Date value1, Date value2) {
            addCriterion("g_create_time between", value1, value2, "gCreateTime");
            return (Criteria) this;
        }

        public Criteria andGCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("g_create_time not between", value1, value2, "gCreateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}